package com.solution.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * UserTypeId
 */
@Embeddable
public class UserTypeId  implements java.io.Serializable
 {

	
	private static final long serialVersionUID = 1L;
	
    private Long userInfoId;
    private Long entityId;


    @Column(name="User_InfoID", nullable=false, precision=10, scale=0)
    public Long getUserInfoId() {
        return this.userInfoId;
    }
    
    public void setUserInfoId(Long userInfoId) {
        this.userInfoId = userInfoId;
    }

    @Column(name="EntityID", nullable=false, precision=10, scale=0)
    public Long getEntityId() {
        return this.entityId;
    }
    
    public void setEntityId(Long entityId) {
        this.entityId = entityId;
    }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof UserTypeId) ) return false;
		 UserTypeId castOther = ( UserTypeId ) other; 
         
		 return ( (this.getUserInfoId()==castOther.getUserInfoId()) || ( this.getUserInfoId()!=null && castOther.getUserInfoId()!=null && this.getUserInfoId().equals(castOther.getUserInfoId()) ) )
 && ( (this.getEntityId()==castOther.getEntityId()) || ( this.getEntityId()!=null && castOther.getEntityId()!=null && this.getEntityId().equals(castOther.getEntityId()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getUserInfoId() == null ? 0 : this.getUserInfoId().hashCode() );
         result = 37 * result + ( getEntityId() == null ? 0 : this.getEntityId().hashCode() );
         return result;
   }   


}


